-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement MultiProcessingStage
#1878
Implement MultiProcessingStage
#1878
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very close. Need a few tweaks to how stop/join works. Also, can you add more type annotations to this PR? For any public function, type annotations are helpful.
python/morpheus/morpheus/stages/general/multi_processing_stage.py
Outdated
Show resolved
Hide resolved
python/morpheus/morpheus/stages/general/multi_processing_stage.py
Outdated
Show resolved
Hide resolved
…mpl-multi-process-stage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better implementation with the condition variables. Looks good.
/merge |
Description
Implemented
SharedProcessPool
andMultiProcessingStage
.SharedProcessPool
SHARED_PROCESS_POOL_CPU_USAGE
, which is multiplied by the system’s available CPU cores (os.sched_getaffinity(0)
).MultiProcessingStage
MultiProcessingBaseStage
and implement the data processing logic in the_on_data()
method.MultiProcessingStage.create()
by passing in the processing function directly.Closes #1850
By Submitting this PR I confirm: